import request from "@/utils/request";


// 修改放号
export function updateUpper(data) {
  return request({
    url: "/backAdmin/shiftApi/appointment/upper/update",
    method: "post",
    data: data,
  });
}

// 预约用户列表
export function shiftApiAppointmentUserList(employeeShiftDetailId) {
  return request({
    url: `/backAdmin/shiftApi/appointment/user/list?employeeShiftDetailId=${employeeShiftDetailId}`,
    method: "get",
  });
}


// 放号列表
export function listUpper(query) {
  return request({
    url: "/backAdmin/shiftApi/appointment/upper/list",
    method: "get",
    params: query,
  });
}

// 删除放号
export function delUpper(employeeShiftDetailIdList) {
  return request({
    url: `/backAdmin/shiftApi/appointment/upper/delete?employeeShiftDetailIdList=${employeeShiftDetailIdList}`,
    method: "post",
  });
}


// 考勤列表
export function listClock(query) {
  return request({
    url: "/backAdmin/shiftApi/clock/list",
    method: "get",
    params: query,
  });
}

// 日常事务详情
export function shiftApiCheckDetail(employeeClockId) {
  return request({
    url: `/backAdmin/shiftApi/check/detail?employeeClockId=${employeeClockId}`,
    method: "get",
  });
}

//  单位日常事务列表
export function shiftApichecklistmerchant(query) {
  return request({
    url: `/backAdmin/shiftApi/check/list/merchant`,
    method: "get",
    params: query,
  });
}
// 平台日常事务列表
export function shiftApichecklist(query) {
  return request({
    url: `/backAdmin/shiftApi/check/list`,
    method: "get",
    params: query,
  });
}
// 测试
export function listCheck(query) {
  return request({
    url: `/backAdmin/shiftApi/check/list`,
    method: "get",
    params: query,
  });
}

// 部门列表
export function shiftApideptlist() {
  return request({
    url: `/backAdmin/shiftApi/dept/list`,
    method: "get",
  });
}
// 部门员工列表
export function shiftApideptemployeelist(deptId) {
  return request({
    url: `/backAdmin/shiftApi/dept/employee/list?deptId=${deptId}`,
    method: "get",
  });
}
// 添加排版
export function shiftApishiftadd(data) {
  return request({
    url: `/backAdmin/shiftApi/shift/add`,
    method: "post",
    data,
  });
}

// 删除排版
export function delShift(employeeClockIdList) {
  return request({
    url: `/backAdmin/shiftApi/shift/delete?employeeClockIdList=${employeeClockIdList}`,
    method: "post",
  });
}

// 排版列表
export function listShift(query) {
  return request({
    url: "/backAdmin/shiftApi/shift/list",
    method: "get",
    params: query,
  });
}

export function delNotice() {}

// 查询公告详细
export function getNotice(noticeId) {
  return request({
    url: "/system/notice/" + noticeId,
    method: "get",
  });
}

// 新增公告
export function addNotice(data) {
  return request({
    url: "/system/notice",
    method: "post",
    data: data,
  });
}

// 修改公告
export function updateNotice(data) {
  return request({
    url: "/system/notice",
    method: "put",
    data: data,
  });
}
